<?
if(!defined ('U_MOD'))
{
	echo"<meta http-equiv='refresh' content='0;url=/index.php'>";
	exit;
}

include 'topmenu.php';

$queryGetFooterNav=mysql_query("SELECT * FROM ".$PortalPref.$amk." ORDER BY nav_footer ASC");

$queryMax=mysql_query("SELECT MAX(nav_footer) AS max FROM ".$PortalPref."navigation");
$resultMax=mysql_fetch_assoc($queryMax);

$dd=1;
print '<table>';
while($resultGetFooterNav=mysql_fetch_assoc($queryGetFooterNav))
{
	if ($resultGetFooterNav['nav_footer']>0)
		$ActivityIcon='<a href="'.$portal_url.'/admin.php?amk='.$amk.'&apk=change&act=7&nid='.$resultGetFooterNav['nav_id'].'"><img src="'.$portal_url.'/images/icon/16x16_png/yes.png" id="img-action" title="'._ACTIVE_NAV_TITLE_Y_.'" ></a>';
	else
		$ActivityIcon='<a href="'.$portal_url.'/admin.php?amk='.$amk.'&apk=change&act=6&nid='.$resultGetFooterNav['nav_id'].'"><img src="'.$portal_url.'/images/icon/16x16_png/warning.png" id="img-action" title="'._ACTIVE_NAV_TITLE_N_.'" ></a>';

	if ($resultGetFooterNav['nav_footer']==0)
	{
			$arrowIcon='';
	}else
	{
		if ($resultGetFooterNav['nav_footer']==1)
			$arrowIcon='<a href="'.$portal_url.'/admin.php?amk='.$amk.'&apk=change&act=8&nid='.$resultGetFooterNav['nav_id'].'"><img src="'.$portal_url.'/images/icon/16x16_png/down.png" id="img-action" title="'._GO_DOWN_TITLE_.'"></a>';
		else
		{
			if($resultMax['max']==$resultGetFooterNav['nav_footer'])
				$arrowIcon='<a href="'.$portal_url.'/admin.php?amk='.$amk.'&apk=change&act=9&nid='.$resultGetFooterNav['nav_id'].'"><img src="'.$portal_url.'/images/icon/16x16_png/up.png" id="img-action" title="'._GO_UP_TITLE_.'"></a>';
			else
				$arrowIcon='<a href="'.$portal_url.'/admin.php?amk='.$amk.'&apk=change&act=8&nid='.$resultGetFooterNav['nav_id'].'"><img src="'.$portal_url.'/images/icon/16x16_png/down.png" id="img-action" title="'._GO_DOWN_TITLE_.'"></a><a href="'.$portal_url.'/admin.php?amk='.$amk.'&apk=change&act=9&nid='.$resultGetFooterNav['nav_id'].'"><img src="'.$portal_url.'/images/icon/16x16_png/up.png" id="img-action" title="'._GO_UP_TITLE_.'"></a>';
		}
	}

	$dd++;$iclass = ($dd % 2) ? "even" : "odd";
	print '<tr id="'.$iclass.'">
		<td>'.pEcho($resultGetFooterNav['nav_title']).'</td>
		<td>'.$ActivityIcon.''.$arrowIcon.'</td>
	</tr>';
}
print '</table>';
?>